package flash3.framework
{
	public class ListManager
	{
		protected var list:Array = new Array;
		public function ListManager()
		{
		}
		
		public function add(obj:*):void
		{
			list.push(obj);
		}
		
		public function remove(obj:*):void
		{
			if(!obj) return;
			
			for(var i:uint=0;i<list.length;i++)
			{
				if(obj == list[i])
				{
					list.splice(i);
					return;
				}
			}
		}
		public function value(index:uint):*
		{
			return list[index];
		}
		public function clear():void
		{
			list.length = 0;
		}
		public function get length():uint
		{
			return list.length;
		}
		public function values():Array
		{
			return list;
		}
	}
}